package com.feeyo.monitor.service.imp;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.feeyo.monitor.domain.LimitArea;
import com.feeyo.monitor.mapper.LimitAreaMapper;
import com.feeyo.monitor.service.LimitAreaService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

@Service
public class LimitAreaServiceImp implements LimitAreaService {

	@Autowired
	LimitAreaMapper limitAreaMapper;

	
	@Override
	public int insert(LimitArea record) {
		return limitAreaMapper.insert(record);
	}

	@Override
	public LimitArea selectByPrimaryKey(String id) {
		return limitAreaMapper.selectByPrimaryKey(id);
	}

	@Deprecated
	@Override
	public Page<LimitArea> selectByPage() {
		Page<LimitArea> page = PageHelper.startPage(3, 5);
		limitAreaMapper.selectByPage();
		return page;
	}

	@Override
	public List<LimitArea> selectByAirport(String airport) {
		return limitAreaMapper.selectByAirport(airport);
	}

	@Override
	public int deleteByAreaId(String id) {
		return limitAreaMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int updateDeleteStatus(String areaId) {
		return limitAreaMapper.updateDeleteStatus(areaId);
	}

	@Override
	public int updateByPrimaryKeySelective(LimitArea record) {
		return limitAreaMapper.updateByPrimaryKeySelective(record);
	}

    @Override
    public List<Map> selectApron() {
        return limitAreaMapper.selectApron();
    }

    @Override
    public int insertApron(Map param) {
        return limitAreaMapper.insertApron(param);
    }


}
